<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
    <div class="table-responsive">
        <table class="table table-bordered">
            <thead>
            <tr>
                <th class="text-center" width="10%">ID</th>
                <th class="text-center" width="40%">名称</th>
                <th class="text-center" width="30%">加入方式</th>
                <th class="text-center" width="10%">状态</th>
                <th class="text-center" width="10%">操作</th>
            </tr>
            </thead>
            <tbody>
                <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                    <td colspan="5" class="text-center">
                        <div class="noDataTipsBox">
                            <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                        </div>
                    </td>
                </tr>
                <tr th:if="${!#lists.isEmpty(dataMap['list'])}" th:each="agentUser:${dataMap['list']}" th:attrappend="data-id=${agentUser['id']}">
                    <td class="text-center" th:text="${agentUser['id']}"></td>
                    <td class="text-center" th:text="${agentUser['agentUserName']}"></td>
                    <td class="text-center" th:text="${agentUser['createFrom']} == 1?'代创建':'自申请'"></td>
                    <td class="text-center">
                        <span class="label label-info" th:if="${agentUser['status']}==1">待提交</span>
                        <span class="label label-danger" th:if="${agentUser['status']}==2">待审核</span>
                        <span class="label label-primary" th:if="${agentUser['status']}==3">正常</span>
                        <span class="label label-default" th:if="${agentUser['status']}==4">禁用</span>
                        <span class="label label-warning" th:if="${agentUser['status']}==5">驳回</span>
                    </td>
                    <td class="text-center">
                        <a th:href="@{/admin/agent/user/agentUserInfo?agentUserId={agentUserId}(agentUserId=${agentUser['id']})}" class="c-master userLookInfo" data-toggle="tooltip" data-placement="top" data-original-title="查看">
                            <i class="fa fa-eye"></i>
                        </a>
                    </td>
                </tr>
            </tbody>
        </table>
        <!-- 分页，开始 -->
        <div class="text-center" th:if="${dataMap['pages']}>1">
            <nav>
                <ul class="pager">
                    <li class="disabled" th:if="${dataMap['pageNum']}==1">
                        <a>
                            <i class="fa fa-chevron-left"></i> 上一页
                        </a>
                    </li>
                    <li th:if="${dataMap['pageNum']}>1">
                        <a href="javascript:void (0);" th:attr="data-page=${dataMap['pageNum']}-1" id="upPage">
                            <i class="fa fa-chevron-left"></i> 上一页
                        </a>
                    </li>
                    <li class="disabled" th:if="${dataMap['pageNum']} == ${dataMap['pages']}">
                        <a>
                            下一页<i class="fa fa-chevron-right"></i>
                        </a>
                    </li>
                    <li th:if="${dataMap['pageNum']} < ${dataMap['pages']}">
                        <a href="javascript:void (0);" th:attr="data-page=${dataMap['pageNum']}+1" id="next-page">
                            下一页
                            <i class="fa fa-chevron-right"></i>
                        </a>
                    </li>
                </ul>
            </nav>
        </div>
        <!-- 分页，结束 -->
    </div>
</html>